home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2000 #4
/
Amiga Plus CD - 2000 - No. 4.iso
/
Tools
/
Text
/
Misc
/
TextloaderTNG
/
Rexx
/
For_ScanQuix
/
pagestream3
/
macros
/
ScanImageBME.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1999-03-03
|
954b
|
55 lines
/* $VER: ScanImage.rexx 1.0 for BME V2.0f © by Jochen Grus (04.09.96) */
OPTIONS RESULTS
ADDRESS 'BME'
options failat 25 /* ScanToDisk returns 0 or 20 */
tempfile='T:PGS_ScannnedImage'
ok=1
call SCAN() /* Scans the image into a temporary file */
call IMPORTGRAPHIC() /* Loads Image into BME */
call DELETEFILE() /* Removes temporary image file */
EXIT
SCAN:
/* Scans the image into a temporary file using the program "ScanToDisk". */
if not 1=open('path','ENV:ScanQuix/Path','READ') then do
ok=0
return
end
pragma('DIRECTORY',READLN('path'))
address command 'ScanQuix3/ScanToDisk FILE="'tempfile'" TRUECOLOR NOICONS NOGUI PUBSCREEN=BME'
if RC>=5 then do
ok=0
return
end
return
IMPORTGRAPHIC:
/* Loads the image into BME */
if ok=0 then
return
'open FILE 'tempfile' FILTER IFFILBM'
return
DELETEFILE:
/* removes temporary file */
address command 'delete >NIL: 'tempfile
return